package com.zy.explore.constant;

import com.zy.explore.cause.BaseException;

/**
 * description 异常状态码和信息
 *
 * @author ZY
 * @date 2021-05-05 18:01
 */
public interface StatusCode {

    int getCode();

    String getMessage();

    default BaseException toException() {
        return new BaseException(getCode(), getMessage());
    }
}
